![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
jss-nested
Advanced tools
Make sure you read how to use plugins in general.
&
to reference selector of the parent rule.const styles = {
container: {
padding: 20,
'&:hover': {
background: 'blue'
},
// Add a global .clear class to the container.
'&.clear': {
clear: 'both'
},
// Reference a global .button scoped to the container.
'& .button': {
background: 'red'
},
// Use multiple container refs in one selector
'&.selected, &.active': {
border: '1px solid red'
}
}
}
Compiles to:
.container-3775999496 {
padding: 20px;
}
.container-3775999496:hover {
background: blue;
}
.container-3775999496.clear {
clear: both;
}
.container-3775999496 .button {
background: red;
}
.container-3775999496.selected, .container-3775999496.active {
border: 1px solid red;
}
$ruleName
to reference a local rule within the same style sheet.const styles = {
container: {
// Reference the local rule "button".
'& $button': {
padding: '10px'
},
// Multiple local refs in one rule.
'&:hover $button, &:active $button': {
color: 'red',
},
'&:focus $button': {
color: 'blue'
}
},
button: {
color: 'grey'
}
}
Compiles to:
.button-3940538223 {
color: grey;
}
.container-2645419599 .button-3940538223 {
padding: 10px;
}
.container-2645419599:hover .button-3940538223, .container-2645419599:active .button-3940538223 {
color: red;
}
.container-2645419599:focus .button-3940538223 {
color: blue;
}
const styles = {
button: {
color: 'red',
'@media (min-width: 1024px)': {
width: 200
}
}
}
Compiles to:
.button-2683044438 {
color: red;
}
@media (min-width: 1024px) {
.button-2683044438 {
width: 200px;
}
}
const styles = {
button: {
'&$warn': {
color: 'red',
'&:hover, &:focus': {
color: 'white',
background: 'red'
}
}
},
warn: {}
}
Compiles to:
.button-274964227.warn-2315792072 {
color: red;
}
.button-274964227.warn-2315792072:hover, .button-274964227.warn-2315792072:focus {
color: white;
background: red;
}
File a bug against cssinjs/jss prefixed with [jss-nested].
npm i
npm run test
MIT
FAQs
JSS plugin that enables support for nested selectors
The npm package jss-nested receives a total of 101,627 weekly downloads. As such, jss-nested popularity was classified as popular.
We found that jss-nested demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.